﻿using System;
using System.Collections.Generic;
using UTS_Subject_Enrolment_System.Model;

namespace UTS_Subject_Enrolment_System.Service
{
    public interface IRequestService
    {
        /// <summary>
        /// Get request ids submitted by a particular student 
        /// </summary>
        /// <param name="student"/>
        int[] GetSubmittedRequestIds(int studentId);  //only retrieve request Ids 

        /// <summary>
        /// Get all submitted request ids for staff
        /// </summary>
        int[] GetAllRequestIds();

        /// <summary>
        /// Return a request instance 
        /// </summary>
        Request GetRequestById(int requestIds); //could be made as private in implementation class

        /// <summary>
        /// Get all request objects by given request ids
        /// </summary>
        /// <param name="requestIds">an array of request ids</param>
        /// <returns>a list of requests</returns>
        List<Request> GetRequestsByIds(int[] requestIds);    

        /// <summary>
        /// Add a new request for revoking pre-requisit
        /// </summary>
        /// <param name="student"></param>
        /// <param name="request"></param>
        void AddRequest(int requestId, string summary, int studentId, int subjectId, RequestStatus status = RequestStatus.Pending);

        /// <summary>
        /// Decide if approve or refuse a request
        /// </summary>
        /// <param name="request"></param>
        void ProcessRequest(int requestId, RequestStatus status);
    }
}
